<script setup>
export default {
  name: 'ChildLife',
  data() {
    return {
      num: 0
    }
  },
  beforeCreate() {
    console.log('beforeCreate'+this.num)
  },
  created() {
    console.log('created'+this.num)
  },
  beforeMount() {
  console.log('beforeMount'+this.num)
  },
  mounted() {
  console.log('mounted'+this.num)
  },
  updated() {
  console.log('updated'+this.num)
  },
  unmounted() {
  console.log('unmounted'+this.num)
  }
}
</script>

<template>
<p>{{num}}</p>
<button @click="num++">+</button>
</template>

<style scoped></style>